/************************************************************************
  Driver for the weight sensor MP40 and for the signal amplifier AD8555.                                                               
************************************************************************/

#define AMP_PORT PORTA
#define AMP_PIN PINA
#define AMP_DDR DDRA

#define NUM_SAMPLES 4000


int16_t WeightRead();
void WeightSensorInit();
// Returns the weight filtered but not calibrated
uint16_t WeightNoCalibrated();
// Updates the ADC value when the container is empty
void WeightCalibrationUpdate();

// Sets the AD8555 parameters.
void setFirstStageGain(uint8_t gain);
void setSecondStageGain(uint8_t gain);
void setOutputOffset(uint8_t offset); 


// For debugging purposes
void ShowWeight();
